package cn.xydata.es;

import cn.xydata.common.util.DateUtils;
import cn.xydata.entity.company.CompanyEntity;

import javax.persistence.Column;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;

/**
 * 企业税务
 *
 * @author tz
 * @create 2024-02-23
 */
public class Company implements Serializable {

    private static final long serialVersionUID = 42L;

    /**
     * 企业id
     */
    private String companyId;

    /**
     * 企业名称
     */
    private String companyName;

    /**
     * 纳税人编号
     */
    private String taxpayersCreditCode;

    /**
     * 法定代表人名称
     */
    private String legalPersonName;

    /**
     * 法定代表人联系方式
     */
    private String legalPersonTel;

    /**
     * 联系人名称
     */
    private String contactPersonName;

    /**
     * 联系人联系方式
     */
    private String contactPersonTel;

    /**
     * 财政行业id
     */
    private String financeIndustryId;

    /**
     * 财政行业名称
     */
    private String financeIndustryName;

    /**
     * 财政分片id
     */
    private Map<String, String> financePartId;

    /**
     * 财政分片名称
     */
    private Map<String, String> financePartName;

    /**
     * 工商行业id
     */
    private String businessIndustryId;

    /**
     * 工商行业名称
     */
    private String businessIndustryName;

    /**
     * 税务行业id
     */
    private String taxIndustryId;

    /**
     * 税务行业名称
     */
    private String taxIndustryName;

    /**
     * 成立日期
     */
    private Date establishDate;

    /**
     * 登记机关
     */
    private String registerDepartment;

    /**
     * 企业类型id
     */
    private String companyTypeId;

    /**
     * 企业类型
     */
    private String companyType;

    /**
     * 所属集团id
     */
    private String groupId;

    /**
     * 所属集团名称
     */
    private String groupName;

    /**
     * 企业属性id
     */
    private String attributeId;

    /**
     * 企业属性名称
     */
    private String attributeName;

    /**
     * 注册资本
     */
    private String registerCapital;

    /**
     * 经营地址
     */
    private String operatingAddress;

    /**
     * 管辖单位
     */
    private String manageDepartment;

    /**
     * 经营范围
     */
    private String operatingRange;

    private String id;

    private Date gmtCreate;

    private String nameCreate;

    private Date gmtModified;

    private String nameModified;

    private Integer isDeleted = 0;

    public Company() {
    }

    public Company(CompanyEntity companyEntity, String financeIndustryId, String financeIndustryName, Map<String, String> financePartIdMap, Map<String, String> financePartNameMap, String businessIndustryId, String businessIndustryName, String taxIndustryId, String taxIndustryName, String companyTypeId, String companyType, String groupId, String groupName, String attributeId, String attributeName) {
        this.id = companyEntity.getId();
        this.gmtCreate = companyEntity.getGmtCreate();
        this.nameCreate = companyEntity.getNameCreate();
        this.gmtModified = companyEntity.getGmtModified();
        this.nameModified = companyEntity.getNameModified();
        this.isDeleted = companyEntity.getIsDeleted();
        this.companyId = companyEntity.getId();
        this.companyName = companyEntity.getCompanyName();
        this.taxpayersCreditCode = companyEntity.getTaxpayersCreditCode();
        this.legalPersonName = companyEntity.getLegalPersonName();
        this.legalPersonTel = companyEntity.getLegalPersonTel();
        this.contactPersonName = companyEntity.getContactPersonName();
        this.contactPersonTel = companyEntity.getContactPersonTel();
        try {
            this.establishDate = DateUtils.parseDate(companyEntity.getEstablishDate());
        } catch (Exception e) {
            this.establishDate = null;
        }
        this.registerDepartment = companyEntity.getRegisterDepartment();
        this.registerCapital = companyEntity.getRegisterCapital();
        this.operatingAddress = companyEntity.getOperatingAddress();
        this.manageDepartment = companyEntity.getManageDepartment();
        this.operatingRange = companyEntity.getOperatingRange();
        this.financeIndustryId = financeIndustryId;
        this.financeIndustryName = financeIndustryName;
        this.financePartId = financePartIdMap;
        this.financePartName = financePartNameMap;
        this.businessIndustryId = businessIndustryId;
        this.businessIndustryName = businessIndustryName;
        this.taxIndustryId = taxIndustryId;
        this.taxIndustryName = taxIndustryName;
        this.companyTypeId = companyTypeId;
        this.companyType = companyType;
        this.groupId = groupId;
        this.groupName = groupName;
        this.attributeId = attributeId;
        this.attributeName = attributeName;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public String getNameCreate() {
        return nameCreate;
    }

    public void setNameCreate(String nameCreate) {
        this.nameCreate = nameCreate;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    public String getNameModified() {
        return nameModified;
    }

    public void setNameModified(String nameModified) {
        this.nameModified = nameModified;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getTaxpayersCreditCode() {
        return taxpayersCreditCode;
    }

    public void setTaxpayersCreditCode(String taxpayersCreditCode) {
        this.taxpayersCreditCode = taxpayersCreditCode;
    }

    public String getLegalPersonName() {
        return legalPersonName;
    }

    public void setLegalPersonName(String legalPersonName) {
        this.legalPersonName = legalPersonName;
    }

    public String getLegalPersonTel() {
        return legalPersonTel;
    }

    public void setLegalPersonTel(String legalPersonTel) {
        this.legalPersonTel = legalPersonTel;
    }

    public String getContactPersonName() {
        return contactPersonName;
    }

    public void setContactPersonName(String contactPersonName) {
        this.contactPersonName = contactPersonName;
    }

    public String getContactPersonTel() {
        return contactPersonTel;
    }

    public void setContactPersonTel(String contactPersonTel) {
        this.contactPersonTel = contactPersonTel;
    }

    public String getFinanceIndustryId() {
        return financeIndustryId;
    }

    public void setFinanceIndustryId(String financeIndustryId) {
        this.financeIndustryId = financeIndustryId;
    }

    public String getFinanceIndustryName() {
        return financeIndustryName;
    }

    public void setFinanceIndustryName(String financeIndustryName) {
        this.financeIndustryName = financeIndustryName;
    }

    public Map<String, String> getFinancePartId() {
        return financePartId;
    }

    public void setFinancePartId(Map<String, String> financePartId) {
        this.financePartId = financePartId;
    }

    public Map<String, String> getFinancePartName() {
        return financePartName;
    }

    public void setFinancePartName(Map<String, String> financePartName) {
        this.financePartName = financePartName;
    }

    public String getBusinessIndustryId() {
        return businessIndustryId;
    }

    public void setBusinessIndustryId(String businessIndustryId) {
        this.businessIndustryId = businessIndustryId;
    }

    public String getBusinessIndustryName() {
        return businessIndustryName;
    }

    public void setBusinessIndustryName(String businessIndustryName) {
        this.businessIndustryName = businessIndustryName;
    }

    public String getTaxIndustryId() {
        return taxIndustryId;
    }

    public void setTaxIndustryId(String taxIndustryId) {
        this.taxIndustryId = taxIndustryId;
    }

    public String getTaxIndustryName() {
        return taxIndustryName;
    }

    public void setTaxIndustryName(String taxIndustryName) {
        this.taxIndustryName = taxIndustryName;
    }

    public Date getEstablishDate() {
        return establishDate;
    }

    public void setEstablishDate(Date establishDate) {
        this.establishDate = establishDate;
    }

    public String getRegisterDepartment() {
        return registerDepartment;
    }

    public void setRegisterDepartment(String registerDepartment) {
        this.registerDepartment = registerDepartment;
    }

    public String getCompanyTypeId() {
        return companyTypeId;
    }

    public void setCompanyTypeId(String companyTypeId) {
        this.companyTypeId = companyTypeId;
    }

    public String getCompanyType() {
        return companyType;
    }

    public void setCompanyType(String companyType) {
        this.companyType = companyType;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getAttributeId() {
        return attributeId;
    }

    public void setAttributeId(String attributeId) {
        this.attributeId = attributeId;
    }

    public String getAttributeName() {
        return attributeName;
    }

    public void setAttributeName(String attributeName) {
        this.attributeName = attributeName;
    }

    public String getRegisterCapital() {
        return registerCapital;
    }

    public void setRegisterCapital(String registerCapital) {
        this.registerCapital = registerCapital;
    }

    public String getOperatingAddress() {
        return operatingAddress;
    }

    public void setOperatingAddress(String operatingAddress) {
        this.operatingAddress = operatingAddress;
    }

    public String getManageDepartment() {
        return manageDepartment;
    }

    public void setManageDepartment(String manageDepartment) {
        this.manageDepartment = manageDepartment;
    }

    public String getOperatingRange() {
        return operatingRange;
    }

    public void setOperatingRange(String operatingRange) {
        this.operatingRange = operatingRange;
    }
}
